<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>PlaybackStatsListener (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="PlaybackStatsListener (ExoPlayer library)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2.analytics</a></div>
<h2 title="Class PlaybackStatsListener" class="title">Class PlaybackStatsListener</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>com.google.android.exoplayer2.analytics.PlaybackStatsListener</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="AnalyticsListener.html" title="interface in com.google.android.exoplayer2.analytics">AnalyticsListener</a></code>, <code><a href="PlaybackSessionManager.Listener.html" title="interface in com.google.android.exoplayer2.analytics">PlaybackSessionManager.Listener</a></code></dd>
</dl>
<hr>
<pre>public final class <span class="typeNameLabel">PlaybackStatsListener</span>
extends <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>
implements <a href="AnalyticsListener.html" title="interface in com.google.android.exoplayer2.analytics">AnalyticsListener</a>, <a href="PlaybackSessionManager.Listener.html" title="interface in com.google.android.exoplayer2.analytics">PlaybackSessionManager.Listener</a></pre>
<div class="block"><a href="AnalyticsListener.html" title="interface in com.google.android.exoplayer2.analytics"><code>AnalyticsListener</code></a> to gather <a href="PlaybackStats.html" title="class in com.google.android.exoplayer2.analytics"><code>PlaybackStats</code></a> from the player.

 <p>For accurate measurements, the listener should be added to the player before loading media,
 i.e., <a href="../Player.html#getPlaybackState()"><code>Player.getPlaybackState()</code></a> should be <a href="../Player.html#STATE_IDLE"><code>Player.STATE_IDLE</code></a>.

 <p>Playback stats are gathered separately for each playback session, i.e. each window in the
 <a href="../Timeline.html" title="class in com.google.android.exoplayer2"><code>Timeline</code></a> and each single ad.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="PlaybackStatsListener.Callback.html" title="interface in com.google.android.exoplayer2.analytics">PlaybackStatsListener.Callback</a></span></code></th>
<td class="colLast">
<div class="block">A listener for <a href="PlaybackStats.html" title="class in com.google.android.exoplayer2.analytics"><code>PlaybackStats</code></a> updates.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.com.google.android.exoplayer2.analytics.AnalyticsListener">
<!--   -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;com.google.android.exoplayer2.analytics.<a href="AnalyticsListener.html" title="interface in com.google.android.exoplayer2.analytics">AnalyticsListener</a></h3>
<code><a href="AnalyticsListener.EventFlags.html" title="annotation in com.google.android.exoplayer2.analytics">AnalyticsListener.EventFlags</a>, <a href="AnalyticsListener.Events.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.Events</a>, <a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.com.google.android.exoplayer2.analytics.AnalyticsListener">
<!--   -->
</a>
<h3>Fields inherited from interface&nbsp;com.google.android.exoplayer2.analytics.<a href="AnalyticsListener.html" title="interface in com.google.android.exoplayer2.analytics">AnalyticsListener</a></h3>
<code><a href="AnalyticsListener.html#EVENT_AUDIO_ATTRIBUTES_CHANGED">EVENT_AUDIO_ATTRIBUTES_CHANGED</a>, <a href="AnalyticsListener.html#EVENT_AUDIO_CODEC_ERROR">EVENT_AUDIO_CODEC_ERROR</a>, <a href="AnalyticsListener.html#EVENT_AUDIO_DECODER_INITIALIZED">EVENT_AUDIO_DECODER_INITIALIZED</a>, <a href="AnalyticsListener.html#EVENT_AUDIO_DECODER_RELEASED">EVENT_AUDIO_DECODER_RELEASED</a>, <a href="AnalyticsListener.html#EVENT_AUDIO_DISABLED">EVENT_AUDIO_DISABLED</a>, <a href="AnalyticsListener.html#EVENT_AUDIO_ENABLED">EVENT_AUDIO_ENABLED</a>, <a href="AnalyticsListener.html#EVENT_AUDIO_INPUT_FORMAT_CHANGED">EVENT_AUDIO_INPUT_FORMAT_CHANGED</a>, <a href="AnalyticsListener.html#EVENT_AUDIO_POSITION_ADVANCING">EVENT_AUDIO_POSITION_ADVANCING</a>, <a href="AnalyticsListener.html#EVENT_AUDIO_SESSION_ID">EVENT_AUDIO_SESSION_ID</a>, <a href="AnalyticsListener.html#EVENT_AUDIO_SINK_ERROR">EVENT_AUDIO_SINK_ERROR</a>, <a href="AnalyticsListener.html#EVENT_AUDIO_UNDERRUN">EVENT_AUDIO_UNDERRUN</a>, <a href="AnalyticsListener.html#EVENT_BANDWIDTH_ESTIMATE">EVENT_BANDWIDTH_ESTIMATE</a>, <a href="AnalyticsListener.html#EVENT_DOWNSTREAM_FORMAT_CHANGED">EVENT_DOWNSTREAM_FORMAT_CHANGED</a>, <a href="AnalyticsListener.html#EVENT_DRM_KEYS_LOADED">EVENT_DRM_KEYS_LOADED</a>, <a href="AnalyticsListener.html#EVENT_DRM_KEYS_REMOVED">EVENT_DRM_KEYS_REMOVED</a>, <a href="AnalyticsListener.html#EVENT_DRM_KEYS_RESTORED">EVENT_DRM_KEYS_RESTORED</a>, <a href="AnalyticsListener.html#EVENT_DRM_SESSION_ACQUIRED">EVENT_DRM_SESSION_ACQUIRED</a>, <a href="AnalyticsListener.html#EVENT_DRM_SESSION_MANAGER_ERROR">EVENT_DRM_SESSION_MANAGER_ERROR</a>, <a href="AnalyticsListener.html#EVENT_DRM_SESSION_RELEASED">EVENT_DRM_SESSION_RELEASED</a>, <a href="AnalyticsListener.html#EVENT_DROPPED_VIDEO_FRAMES">EVENT_DROPPED_VIDEO_FRAMES</a>, <a href="AnalyticsListener.html#EVENT_IS_LOADING_CHANGED">EVENT_IS_LOADING_CHANGED</a>, <a href="AnalyticsListener.html#EVENT_IS_PLAYING_CHANGED">EVENT_IS_PLAYING_CHANGED</a>, <a href="AnalyticsListener.html#EVENT_LOAD_CANCELED">EVENT_LOAD_CANCELED</a>, <a href="AnalyticsListener.html#EVENT_LOAD_COMPLETED">EVENT_LOAD_COMPLETED</a>, <a href="AnalyticsListener.html#EVENT_LOAD_ERROR">EVENT_LOAD_ERROR</a>, <a href="AnalyticsListener.html#EVENT_LOAD_STARTED">EVENT_LOAD_STARTED</a>, <a href="AnalyticsListener.html#EVENT_MEDIA_ITEM_TRANSITION">EVENT_MEDIA_ITEM_TRANSITION</a>, <a href="AnalyticsListener.html#EVENT_MEDIA_METADATA_CHANGED">EVENT_MEDIA_METADATA_CHANGED</a>, <a href="AnalyticsListener.html#EVENT_METADATA">EVENT_METADATA</a>, <a href="AnalyticsListener.html#EVENT_PLAY_WHEN_READY_CHANGED">EVENT_PLAY_WHEN_READY_CHANGED</a>, <a href="AnalyticsListener.html#EVENT_PLAYBACK_PARAMETERS_CHANGED">EVENT_PLAYBACK_PARAMETERS_CHANGED</a>, <a href="AnalyticsListener.html#EVENT_PLAYBACK_STATE_CHANGED">EVENT_PLAYBACK_STATE_CHANGED</a>, <a href="AnalyticsListener.html#EVENT_PLAYBACK_SUPPRESSION_REASON_CHANGED">EVENT_PLAYBACK_SUPPRESSION_REASON_CHANGED</a>, <a href="AnalyticsListener.html#EVENT_PLAYER_ERROR">EVENT_PLAYER_ERROR</a>, <a href="AnalyticsListener.html#EVENT_PLAYER_RELEASED">EVENT_PLAYER_RELEASED</a>, <a href="AnalyticsListener.html#EVENT_POSITION_DISCONTINUITY">EVENT_POSITION_DISCONTINUITY</a>, <a href="AnalyticsListener.html#EVENT_RENDERED_FIRST_FRAME">EVENT_RENDERED_FIRST_FRAME</a>, <a href="AnalyticsListener.html#EVENT_REPEAT_MODE_CHANGED">EVENT_REPEAT_MODE_CHANGED</a>, <a href="AnalyticsListener.html#EVENT_SHUFFLE_MODE_ENABLED_CHANGED">EVENT_SHUFFLE_MODE_ENABLED_CHANGED</a>, <a href="AnalyticsListener.html#EVENT_SKIP_SILENCE_ENABLED_CHANGED">EVENT_SKIP_SILENCE_ENABLED_CHANGED</a>, <a href="AnalyticsListener.html#EVENT_STATIC_METADATA_CHANGED">EVENT_STATIC_METADATA_CHANGED</a>, <a href="AnalyticsListener.html#EVENT_SURFACE_SIZE_CHANGED">EVENT_SURFACE_SIZE_CHANGED</a>, <a href="AnalyticsListener.html#EVENT_TIMELINE_CHANGED">EVENT_TIMELINE_CHANGED</a>, <a href="AnalyticsListener.html#EVENT_TRACKS_CHANGED">EVENT_TRACKS_CHANGED</a>, <a href="AnalyticsListener.html#EVENT_UPSTREAM_DISCARDED">EVENT_UPSTREAM_DISCARDED</a>, <a href="AnalyticsListener.html#EVENT_VIDEO_CODEC_ERROR">EVENT_VIDEO_CODEC_ERROR</a>, <a href="AnalyticsListener.html#EVENT_VIDEO_DECODER_INITIALIZED">EVENT_VIDEO_DECODER_INITIALIZED</a>, <a href="AnalyticsListener.html#EVENT_VIDEO_DECODER_RELEASED">EVENT_VIDEO_DECODER_RELEASED</a>, <a href="AnalyticsListener.html#EVENT_VIDEO_DISABLED">EVENT_VIDEO_DISABLED</a>, <a href="AnalyticsListener.html#EVENT_VIDEO_ENABLED">EVENT_VIDEO_ENABLED</a>, <a href="AnalyticsListener.html#EVENT_VIDEO_FRAME_PROCESSING_OFFSET">EVENT_VIDEO_FRAME_PROCESSING_OFFSET</a>, <a href="AnalyticsListener.html#EVENT_VIDEO_INPUT_FORMAT_CHANGED">EVENT_VIDEO_INPUT_FORMAT_CHANGED</a>, <a href="AnalyticsListener.html#EVENT_VIDEO_SIZE_CHANGED">EVENT_VIDEO_SIZE_CHANGED</a>, <a href="AnalyticsListener.html#EVENT_VOLUME_CHANGED">EVENT_VOLUME_CHANGED</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(boolean,com.google.android.exoplayer2.analytics.PlaybackStatsListener.Callback)">PlaybackStatsListener</a></span>&#8203;(boolean&nbsp;keepHistory,
                     <a href="PlaybackStatsListener.Callback.html" title="interface in com.google.android.exoplayer2.analytics">PlaybackStatsListener.Callback</a>&nbsp;callback)</code></th>
<td class="colLast">
<div class="block">Creates listener for playback stats.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="PlaybackStats.html" title="class in com.google.android.exoplayer2.analytics">PlaybackStats</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCombinedPlaybackStats()">getCombinedPlaybackStats</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the combined <a href="PlaybackStats.html" title="class in com.google.android.exoplayer2.analytics"><code>PlaybackStats</code></a> for all playback sessions this listener was and is
 listening to.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="PlaybackStats.html" title="class in com.google.android.exoplayer2.analytics">PlaybackStats</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPlaybackStats()">getPlaybackStats</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the <a href="PlaybackStats.html" title="class in com.google.android.exoplayer2.analytics"><code>PlaybackStats</code></a> for the currently playback session, or null if no session is
 active.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onAdPlaybackStarted(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String,java.lang.String)">onAdPlaybackStarted</a></span>&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                   <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;contentSession,
                   <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;adSession)</code></th>
<td class="colLast">
<div class="block">Called when a session is interrupted by ad playback.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onBandwidthEstimate(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int,long,long)">onBandwidthEstimate</a></span>&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                   int&nbsp;totalLoadTimeMs,
                   long&nbsp;totalBytesLoaded,
                   long&nbsp;bitrateEstimate)</code></th>
<td class="colLast">
<div class="block">Called when the bandwidth estimate for the current data source has been updated.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onDownstreamFormatChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.source.MediaLoadData)">onDownstreamFormatChanged</a></span>&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                         <a href="../source/MediaLoadData.html" title="class in com.google.android.exoplayer2.source">MediaLoadData</a>&nbsp;mediaLoadData)</code></th>
<td class="colLast">
<div class="block">Called when the downstream format sent to the renderers changed.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onDrmSessionManagerError(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.Exception)">onDrmSessionManagerError</a></span>&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                        <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a>&nbsp;error)</code></th>
<td class="colLast">
<div class="block">Called when a drm error occurs.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onDroppedVideoFrames(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int,long)">onDroppedVideoFrames</a></span>&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                    int&nbsp;droppedFrames,
                    long&nbsp;elapsedMs)</code></th>
<td class="colLast">
<div class="block">Called after video frames have been dropped.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.analytics.AnalyticsListener.Events)">onEvents</a></span>&#8203;(<a href="../Player.html" title="interface in com.google.android.exoplayer2">Player</a>&nbsp;player,
        <a href="AnalyticsListener.Events.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.Events</a>&nbsp;events)</code></th>
<td class="colLast">
<div class="block">Called after one or more events occurred.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onLoadError(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.source.LoadEventInfo,com.google.android.exoplayer2.source.MediaLoadData,java.io.IOException,boolean)">onLoadError</a></span>&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
           <a href="../source/LoadEventInfo.html" title="class in com.google.android.exoplayer2.source">LoadEventInfo</a>&nbsp;loadEventInfo,
           <a href="../source/MediaLoadData.html" title="class in com.google.android.exoplayer2.source">MediaLoadData</a>&nbsp;mediaLoadData,
           <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a>&nbsp;error,
           boolean&nbsp;wasCanceled)</code></th>
<td class="colLast">
<div class="block">Called when a media source loading error occurred.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onPositionDiscontinuity(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.Player.PositionInfo,com.google.android.exoplayer2.Player.PositionInfo,int)">onPositionDiscontinuity</a></span>&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                       <a href="../Player.PositionInfo.html" title="class in com.google.android.exoplayer2">Player.PositionInfo</a>&nbsp;oldPositionInfo,
                       <a href="../Player.PositionInfo.html" title="class in com.google.android.exoplayer2">Player.PositionInfo</a>&nbsp;newPositionInfo,
                       int&nbsp;reason)</code></th>
<td class="colLast">
<div class="block">Called when a position discontinuity occurred.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onSessionActive(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String)">onSessionActive</a></span>&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
               <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;session)</code></th>
<td class="colLast">
<div class="block">Called when a session becomes active, i.e.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onSessionCreated(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String)">onSessionCreated</a></span>&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;session)</code></th>
<td class="colLast">
<div class="block">Called when a new session is created as a result of <a href="PlaybackSessionManager.html#updateSessions(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime)"><code>PlaybackSessionManager.updateSessions(EventTime)</code></a>.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onSessionFinished(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String,boolean)">onSessionFinished</a></span>&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                 <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;session,
                 boolean&nbsp;automaticTransition)</code></th>
<td class="colLast">
<div class="block">Called when a session is permanently finished.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#onVideoSizeChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.video.VideoSize)">onVideoSizeChanged</a></span>&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                  <a href="../video/VideoSize.html" title="class in com.google.android.exoplayer2.video">VideoSize</a>&nbsp;videoSize)</code></th>
<td class="colLast">
<div class="block">Called before a frame is rendered for the first time since setting the surface, and each time
 there's a change in the size or pixel aspect ratio of the video being rendered.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.com.google.android.exoplayer2.analytics.AnalyticsListener">
<!--   -->
</a>
<h3>Methods inherited from interface&nbsp;com.google.android.exoplayer2.analytics.<a href="AnalyticsListener.html" title="interface in com.google.android.exoplayer2.analytics">AnalyticsListener</a></h3>
<code><a href="AnalyticsListener.html#onAudioAttributesChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.audio.AudioAttributes)">onAudioAttributesChanged</a>, <a href="AnalyticsListener.html#onAudioCodecError(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.Exception)">onAudioCodecError</a>, <a href="AnalyticsListener.html#onAudioDecoderInitialized(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String,long)">onAudioDecoderInitialized</a>, <a href="AnalyticsListener.html#onAudioDecoderInitialized(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String,long,long)">onAudioDecoderInitialized</a>, <a href="AnalyticsListener.html#onAudioDecoderReleased(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String)">onAudioDecoderReleased</a>, <a href="AnalyticsListener.html#onAudioDisabled(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.decoder.DecoderCounters)">onAudioDisabled</a>, <a href="AnalyticsListener.html#onAudioEnabled(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.decoder.DecoderCounters)">onAudioEnabled</a>, <a href="AnalyticsListener.html#onAudioInputFormatChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.Format)">onAudioInputFormatChanged</a>, <a href="AnalyticsListener.html#onAudioInputFormatChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.Format,com.google.android.exoplayer2.decoder.DecoderReuseEvaluation)">onAudioInputFormatChanged</a>, <a href="AnalyticsListener.html#onAudioPositionAdvancing(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,long)">onAudioPositionAdvancing</a>, <a href="AnalyticsListener.html#onAudioSessionIdChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int)">onAudioSessionIdChanged</a>, <a href="AnalyticsListener.html#onAudioSinkError(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.Exception)">onAudioSinkError</a>, <a href="AnalyticsListener.html#onAudioUnderrun(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int,long,long)">onAudioUnderrun</a>, <a href="AnalyticsListener.html#onDecoderDisabled(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int,com.google.android.exoplayer2.decoder.DecoderCounters)">onDecoderDisabled</a>, <a href="AnalyticsListener.html#onDecoderEnabled(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int,com.google.android.exoplayer2.decoder.DecoderCounters)">onDecoderEnabled</a>, <a href="AnalyticsListener.html#onDecoderInitialized(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int,java.lang.String,long)">onDecoderInitialized</a>, <a href="AnalyticsListener.html#onDecoderInputFormatChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int,com.google.android.exoplayer2.Format)">onDecoderInputFormatChanged</a>, <a href="AnalyticsListener.html#onDrmKeysLoaded(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime)">onDrmKeysLoaded</a>, <a href="AnalyticsListener.html#onDrmKeysRemoved(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime)">onDrmKeysRemoved</a>, <a href="AnalyticsListener.html#onDrmKeysRestored(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime)">onDrmKeysRestored</a>, <a href="AnalyticsListener.html#onDrmSessionAcquired(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime)">onDrmSessionAcquired</a>, <a href="AnalyticsListener.html#onDrmSessionAcquired(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int)">onDrmSessionAcquired</a>, <a href="AnalyticsListener.html#onDrmSessionReleased(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime)">onDrmSessionReleased</a>, <a href="AnalyticsListener.html#onIsLoadingChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,boolean)">onIsLoadingChanged</a>, <a href="AnalyticsListener.html#onIsPlayingChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,boolean)">onIsPlayingChanged</a>, <a href="AnalyticsListener.html#onLoadCanceled(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.source.LoadEventInfo,com.google.android.exoplayer2.source.MediaLoadData)">onLoadCanceled</a>, <a href="AnalyticsListener.html#onLoadCompleted(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.source.LoadEventInfo,com.google.android.exoplayer2.source.MediaLoadData)">onLoadCompleted</a>, <a href="AnalyticsListener.html#onLoadingChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,boolean)">onLoadingChanged</a>, <a href="AnalyticsListener.html#onLoadStarted(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.source.LoadEventInfo,com.google.android.exoplayer2.source.MediaLoadData)">onLoadStarted</a>, <a href="AnalyticsListener.html#onMediaItemTransition(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.MediaItem,int)">onMediaItemTransition</a>, <a href="AnalyticsListener.html#onMediaMetadataChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.MediaMetadata)">onMediaMetadataChanged</a>, <a href="AnalyticsListener.html#onMetadata(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.metadata.Metadata)">onMetadata</a>, <a href="AnalyticsListener.html#onPlaybackParametersChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.PlaybackParameters)">onPlaybackParametersChanged</a>, <a href="AnalyticsListener.html#onPlaybackStateChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int)">onPlaybackStateChanged</a>, <a href="AnalyticsListener.html#onPlaybackSuppressionReasonChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int)">onPlaybackSuppressionReasonChanged</a>, <a href="AnalyticsListener.html#onPlayerError(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.ExoPlaybackException)">onPlayerError</a>, <a href="AnalyticsListener.html#onPlayerReleased(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime)">onPlayerReleased</a>, <a href="AnalyticsListener.html#onPlayerStateChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,boolean,int)">onPlayerStateChanged</a>, <a href="AnalyticsListener.html#onPlayWhenReadyChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,boolean,int)">onPlayWhenReadyChanged</a>, <a href="AnalyticsListener.html#onPositionDiscontinuity(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int)">onPositionDiscontinuity</a>, <a href="AnalyticsListener.html#onRenderedFirstFrame(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.Object,long)">onRenderedFirstFrame</a>, <a href="AnalyticsListener.html#onRepeatModeChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int)">onRepeatModeChanged</a>, <a href="AnalyticsListener.html#onSeekProcessed(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime)">onSeekProcessed</a>, <a href="AnalyticsListener.html#onSeekStarted(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime)">onSeekStarted</a>, <a href="AnalyticsListener.html#onShuffleModeChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,boolean)">onShuffleModeChanged</a>, <a href="AnalyticsListener.html#onSkipSilenceEnabledChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,boolean)">onSkipSilenceEnabledChanged</a>, <a href="AnalyticsListener.html#onStaticMetadataChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.util.List)">onStaticMetadataChanged</a>, <a href="AnalyticsListener.html#onSurfaceSizeChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int,int)">onSurfaceSizeChanged</a>, <a href="AnalyticsListener.html#onTimelineChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int)">onTimelineChanged</a>, <a href="AnalyticsListener.html#onTracksChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.source.TrackGroupArray,com.google.android.exoplayer2.trackselection.TrackSelectionArray)">onTracksChanged</a>, <a href="AnalyticsListener.html#onUpstreamDiscarded(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.source.MediaLoadData)">onUpstreamDiscarded</a>, <a href="AnalyticsListener.html#onVideoCodecError(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.Exception)">onVideoCodecError</a>, <a href="AnalyticsListener.html#onVideoDecoderInitialized(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String,long)">onVideoDecoderInitialized</a>, <a href="AnalyticsListener.html#onVideoDecoderInitialized(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String,long,long)">onVideoDecoderInitialized</a>, <a href="AnalyticsListener.html#onVideoDecoderReleased(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String)">onVideoDecoderReleased</a>, <a href="AnalyticsListener.html#onVideoDisabled(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.decoder.DecoderCounters)">onVideoDisabled</a>, <a href="AnalyticsListener.html#onVideoEnabled(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.decoder.DecoderCounters)">onVideoEnabled</a>, <a href="AnalyticsListener.html#onVideoFrameProcessingOffset(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,long,int)">onVideoFrameProcessingOffset</a>, <a href="AnalyticsListener.html#onVideoInputFormatChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.Format)">onVideoInputFormatChanged</a>, <a href="AnalyticsListener.html#onVideoInputFormatChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.Format,com.google.android.exoplayer2.decoder.DecoderReuseEvaluation)">onVideoInputFormatChanged</a>, <a href="AnalyticsListener.html#onVideoSizeChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int,int,int,float)">onVideoSizeChanged</a>, <a href="AnalyticsListener.html#onVolumeChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,float)">onVolumeChanged</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(boolean,com.google.android.exoplayer2.analytics.PlaybackStatsListener.Callback)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>PlaybackStatsListener</h4>
<pre>public&nbsp;PlaybackStatsListener&#8203;(boolean&nbsp;keepHistory,
                             @Nullable
                             <a href="PlaybackStatsListener.Callback.html" title="interface in com.google.android.exoplayer2.analytics">PlaybackStatsListener.Callback</a>&nbsp;callback)</pre>
<div class="block">Creates listener for playback stats.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>keepHistory</code> - Whether the reported <a href="PlaybackStats.html" title="class in com.google.android.exoplayer2.analytics"><code>PlaybackStats</code></a> should keep the full history of
     events.</dd>
<dd><code>callback</code> - An optional callback for finished <a href="PlaybackStats.html" title="class in com.google.android.exoplayer2.analytics"><code>PlaybackStats</code></a>.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a id="getCombinedPlaybackStats()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCombinedPlaybackStats</h4>
<pre class="methodSignature">public&nbsp;<a href="PlaybackStats.html" title="class in com.google.android.exoplayer2.analytics">PlaybackStats</a>&nbsp;getCombinedPlaybackStats()</pre>
<div class="block">Returns the combined <a href="PlaybackStats.html" title="class in com.google.android.exoplayer2.analytics"><code>PlaybackStats</code></a> for all playback sessions this listener was and is
 listening to.

 <p>Note that these <a href="PlaybackStats.html" title="class in com.google.android.exoplayer2.analytics"><code>PlaybackStats</code></a> will not contain the full history of events.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The combined <a href="PlaybackStats.html" title="class in com.google.android.exoplayer2.analytics"><code>PlaybackStats</code></a> for all playback sessions.</dd>
</dl>
</li>
</ul>
<a id="getPlaybackStats()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPlaybackStats</h4>
<pre class="methodSignature">@Nullable
public&nbsp;<a href="PlaybackStats.html" title="class in com.google.android.exoplayer2.analytics">PlaybackStats</a>&nbsp;getPlaybackStats()</pre>
<div class="block">Returns the <a href="PlaybackStats.html" title="class in com.google.android.exoplayer2.analytics"><code>PlaybackStats</code></a> for the currently playback session, or null if no session is
 active.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="PlaybackStats.html" title="class in com.google.android.exoplayer2.analytics"><code>PlaybackStats</code></a> for the current playback session.</dd>
</dl>
</li>
</ul>
<a id="onSessionCreated(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onSessionCreated</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;onSessionCreated&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                             <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;session)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="PlaybackSessionManager.Listener.html#onSessionCreated(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String)">PlaybackSessionManager.Listener</a></code></span></div>
<div class="block">Called when a new session is created as a result of <a href="PlaybackSessionManager.html#updateSessions(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime)"><code>PlaybackSessionManager.updateSessions(EventTime)</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="PlaybackSessionManager.Listener.html#onSessionCreated(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String)">onSessionCreated</a></code>&nbsp;in interface&nbsp;<code><a href="PlaybackSessionManager.Listener.html" title="interface in com.google.android.exoplayer2.analytics">PlaybackSessionManager.Listener</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eventTime</code> - The <a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics"><code>AnalyticsListener.EventTime</code></a> at which the session is created.</dd>
<dd><code>session</code> - The identifier of the new session.</dd>
</dl>
</li>
</ul>
<a id="onSessionActive(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onSessionActive</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;onSessionActive&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                            <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;session)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="PlaybackSessionManager.Listener.html#onSessionActive(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String)">PlaybackSessionManager.Listener</a></code></span></div>
<div class="block">Called when a session becomes active, i.e. playing in the foreground.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="PlaybackSessionManager.Listener.html#onSessionActive(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String)">onSessionActive</a></code>&nbsp;in interface&nbsp;<code><a href="PlaybackSessionManager.Listener.html" title="interface in com.google.android.exoplayer2.analytics">PlaybackSessionManager.Listener</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eventTime</code> - The <a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics"><code>AnalyticsListener.EventTime</code></a> at which the session becomes active.</dd>
<dd><code>session</code> - The identifier of the session.</dd>
</dl>
</li>
</ul>
<a id="onAdPlaybackStarted(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String,java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onAdPlaybackStarted</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;onAdPlaybackStarted&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                                <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;contentSession,
                                <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;adSession)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="PlaybackSessionManager.Listener.html#onAdPlaybackStarted(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String,java.lang.String)">PlaybackSessionManager.Listener</a></code></span></div>
<div class="block">Called when a session is interrupted by ad playback.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="PlaybackSessionManager.Listener.html#onAdPlaybackStarted(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String,java.lang.String)">onAdPlaybackStarted</a></code>&nbsp;in interface&nbsp;<code><a href="PlaybackSessionManager.Listener.html" title="interface in com.google.android.exoplayer2.analytics">PlaybackSessionManager.Listener</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eventTime</code> - The <a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics"><code>AnalyticsListener.EventTime</code></a> at which the ad playback starts.</dd>
<dd><code>contentSession</code> - The session identifier of the content session.</dd>
<dd><code>adSession</code> - The identifier of the ad session.</dd>
</dl>
</li>
</ul>
<a id="onSessionFinished(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String,boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onSessionFinished</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;onSessionFinished&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                              <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;session,
                              boolean&nbsp;automaticTransition)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="PlaybackSessionManager.Listener.html#onSessionFinished(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String,boolean)">PlaybackSessionManager.Listener</a></code></span></div>
<div class="block">Called when a session is permanently finished.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="PlaybackSessionManager.Listener.html#onSessionFinished(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.String,boolean)">onSessionFinished</a></code>&nbsp;in interface&nbsp;<code><a href="PlaybackSessionManager.Listener.html" title="interface in com.google.android.exoplayer2.analytics">PlaybackSessionManager.Listener</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eventTime</code> - The <a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics"><code>AnalyticsListener.EventTime</code></a> at which the session finished.</dd>
<dd><code>session</code> - The identifier of the finished session.</dd>
<dd><code>automaticTransition</code> - Whether the session finished because of an automatic
     transition to the next playback item.</dd>
</dl>
</li>
</ul>
<a id="onPositionDiscontinuity(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.Player.PositionInfo,com.google.android.exoplayer2.Player.PositionInfo,int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onPositionDiscontinuity</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;onPositionDiscontinuity&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                                    <a href="../Player.PositionInfo.html" title="class in com.google.android.exoplayer2">Player.PositionInfo</a>&nbsp;oldPositionInfo,
                                    <a href="../Player.PositionInfo.html" title="class in com.google.android.exoplayer2">Player.PositionInfo</a>&nbsp;newPositionInfo,
                                    <a href="../Player.DiscontinuityReason.html" title="annotation in com.google.android.exoplayer2">@DiscontinuityReason</a>
                                    int&nbsp;reason)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="AnalyticsListener.html#onPositionDiscontinuity(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.Player.PositionInfo,com.google.android.exoplayer2.Player.PositionInfo,int)">AnalyticsListener</a></code></span></div>
<div class="block">Called when a position discontinuity occurred.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="AnalyticsListener.html#onPositionDiscontinuity(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.Player.PositionInfo,com.google.android.exoplayer2.Player.PositionInfo,int)">onPositionDiscontinuity</a></code>&nbsp;in interface&nbsp;<code><a href="AnalyticsListener.html" title="interface in com.google.android.exoplayer2.analytics">AnalyticsListener</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eventTime</code> - The event time.</dd>
<dd><code>oldPositionInfo</code> - The position before the discontinuity.</dd>
<dd><code>newPositionInfo</code> - The position after the discontinuity.</dd>
<dd><code>reason</code> - The reason for the position discontinuity.</dd>
</dl>
</li>
</ul>
<a id="onDroppedVideoFrames(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int,long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onDroppedVideoFrames</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;onDroppedVideoFrames&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                                 int&nbsp;droppedFrames,
                                 long&nbsp;elapsedMs)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="AnalyticsListener.html#onDroppedVideoFrames(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int,long)">AnalyticsListener</a></code></span></div>
<div class="block">Called after video frames have been dropped.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="AnalyticsListener.html#onDroppedVideoFrames(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int,long)">onDroppedVideoFrames</a></code>&nbsp;in interface&nbsp;<code><a href="AnalyticsListener.html" title="interface in com.google.android.exoplayer2.analytics">AnalyticsListener</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eventTime</code> - The event time.</dd>
<dd><code>droppedFrames</code> - The number of dropped frames since the last call to this method.</dd>
<dd><code>elapsedMs</code> - The duration in milliseconds over which the frames were dropped. This duration
     is timed from when the renderer was started or from when dropped frames were last reported
     (whichever was more recent), and not from when the first of the reported drops occurred.</dd>
</dl>
</li>
</ul>
<a id="onLoadError(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.source.LoadEventInfo,com.google.android.exoplayer2.source.MediaLoadData,java.io.IOException,boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onLoadError</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;onLoadError&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                        <a href="../source/LoadEventInfo.html" title="class in com.google.android.exoplayer2.source">LoadEventInfo</a>&nbsp;loadEventInfo,
                        <a href="../source/MediaLoadData.html" title="class in com.google.android.exoplayer2.source">MediaLoadData</a>&nbsp;mediaLoadData,
                        <a href="https://developer.android.com/reference/java/io/IOException.html" title="class or interface in java.io" class="externalLink" target="_top">IOException</a>&nbsp;error,
                        boolean&nbsp;wasCanceled)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="AnalyticsListener.html#onLoadError(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.source.LoadEventInfo,com.google.android.exoplayer2.source.MediaLoadData,java.io.IOException,boolean)">AnalyticsListener</a></code></span></div>
<div class="block">Called when a media source loading error occurred.

 <p>This method being called does not indicate that playback has failed, or that it will fail.
 The player may be able to recover from the error. Hence applications should <em>not</em>
 implement this method to display a user visible error or initiate an application level retry.
 <a href="../Player.Listener.html#onPlayerError(com.google.android.exoplayer2.ExoPlaybackException)"><code>Player.Listener.onPlayerError(com.google.android.exoplayer2.ExoPlaybackException)</code></a> is the appropriate place to implement such behavior. This
 method is called to provide the application with an opportunity to log the error if it wishes
 to do so.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="AnalyticsListener.html#onLoadError(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.source.LoadEventInfo,com.google.android.exoplayer2.source.MediaLoadData,java.io.IOException,boolean)">onLoadError</a></code>&nbsp;in interface&nbsp;<code><a href="AnalyticsListener.html" title="interface in com.google.android.exoplayer2.analytics">AnalyticsListener</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eventTime</code> - The event time.</dd>
<dd><code>loadEventInfo</code> - The <a href="../source/LoadEventInfo.html" title="class in com.google.android.exoplayer2.source"><code>LoadEventInfo</code></a> defining the load event.</dd>
<dd><code>mediaLoadData</code> - The <a href="../source/MediaLoadData.html" title="class in com.google.android.exoplayer2.source"><code>MediaLoadData</code></a> defining the data being loaded.</dd>
<dd><code>error</code> - The load error.</dd>
<dd><code>wasCanceled</code> - Whether the load was canceled as a result of the error.</dd>
</dl>
</li>
</ul>
<a id="onDrmSessionManagerError(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.Exception)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onDrmSessionManagerError</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;onDrmSessionManagerError&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                                     <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a>&nbsp;error)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="AnalyticsListener.html#onDrmSessionManagerError(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.Exception)">AnalyticsListener</a></code></span></div>
<div class="block">Called when a drm error occurs.

 <p>This method being called does not indicate that playback has failed, or that it will fail.
 The player may be able to recover from the error. Hence applications should <em>not</em>
 implement this method to display a user visible error or initiate an application level retry.
 <a href="../Player.Listener.html#onPlayerError(com.google.android.exoplayer2.ExoPlaybackException)"><code>Player.Listener.onPlayerError(com.google.android.exoplayer2.ExoPlaybackException)</code></a> is the appropriate place to implement such behavior. This
 method is called to provide the application with an opportunity to log the error if it wishes
 to do so.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="AnalyticsListener.html#onDrmSessionManagerError(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,java.lang.Exception)">onDrmSessionManagerError</a></code>&nbsp;in interface&nbsp;<code><a href="AnalyticsListener.html" title="interface in com.google.android.exoplayer2.analytics">AnalyticsListener</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eventTime</code> - The event time.</dd>
<dd><code>error</code> - The error.</dd>
</dl>
</li>
</ul>
<a id="onBandwidthEstimate(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int,long,long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onBandwidthEstimate</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;onBandwidthEstimate&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                                int&nbsp;totalLoadTimeMs,
                                long&nbsp;totalBytesLoaded,
                                long&nbsp;bitrateEstimate)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="AnalyticsListener.html#onBandwidthEstimate(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int,long,long)">AnalyticsListener</a></code></span></div>
<div class="block">Called when the bandwidth estimate for the current data source has been updated.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="AnalyticsListener.html#onBandwidthEstimate(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int,long,long)">onBandwidthEstimate</a></code>&nbsp;in interface&nbsp;<code><a href="AnalyticsListener.html" title="interface in com.google.android.exoplayer2.analytics">AnalyticsListener</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eventTime</code> - The event time.</dd>
<dd><code>totalLoadTimeMs</code> - The total time spend loading this update is based on, in milliseconds.</dd>
<dd><code>totalBytesLoaded</code> - The total bytes loaded this update is based on.</dd>
<dd><code>bitrateEstimate</code> - The bandwidth estimate, in bits per second.</dd>
</dl>
</li>
</ul>
<a id="onDownstreamFormatChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.source.MediaLoadData)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onDownstreamFormatChanged</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;onDownstreamFormatChanged&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                                      <a href="../source/MediaLoadData.html" title="class in com.google.android.exoplayer2.source">MediaLoadData</a>&nbsp;mediaLoadData)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="AnalyticsListener.html#onDownstreamFormatChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.source.MediaLoadData)">AnalyticsListener</a></code></span></div>
<div class="block">Called when the downstream format sent to the renderers changed.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="AnalyticsListener.html#onDownstreamFormatChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.source.MediaLoadData)">onDownstreamFormatChanged</a></code>&nbsp;in interface&nbsp;<code><a href="AnalyticsListener.html" title="interface in com.google.android.exoplayer2.analytics">AnalyticsListener</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eventTime</code> - The event time.</dd>
<dd><code>mediaLoadData</code> - The <a href="../source/MediaLoadData.html" title="class in com.google.android.exoplayer2.source"><code>MediaLoadData</code></a> defining the newly selected media data.</dd>
</dl>
</li>
</ul>
<a id="onVideoSizeChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.video.VideoSize)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onVideoSizeChanged</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;onVideoSizeChanged&#8203;(<a href="AnalyticsListener.EventTime.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.EventTime</a>&nbsp;eventTime,
                               <a href="../video/VideoSize.html" title="class in com.google.android.exoplayer2.video">VideoSize</a>&nbsp;videoSize)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="AnalyticsListener.html#onVideoSizeChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.video.VideoSize)">AnalyticsListener</a></code></span></div>
<div class="block">Called before a frame is rendered for the first time since setting the surface, and each time
 there's a change in the size or pixel aspect ratio of the video being rendered.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="AnalyticsListener.html#onVideoSizeChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.video.VideoSize)">onVideoSizeChanged</a></code>&nbsp;in interface&nbsp;<code><a href="AnalyticsListener.html" title="interface in com.google.android.exoplayer2.analytics">AnalyticsListener</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eventTime</code> - The event time.</dd>
<dd><code>videoSize</code> - The new size of the video.</dd>
</dl>
</li>
</ul>
<a id="onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.analytics.AnalyticsListener.Events)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>onEvents</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;onEvents&#8203;(<a href="../Player.html" title="interface in com.google.android.exoplayer2">Player</a>&nbsp;player,
                     <a href="AnalyticsListener.Events.html" title="class in com.google.android.exoplayer2.analytics">AnalyticsListener.Events</a>&nbsp;events)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="AnalyticsListener.html#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.analytics.AnalyticsListener.Events)">AnalyticsListener</a></code></span></div>
<div class="block">Called after one or more events occurred.

 <p>State changes and events that happen within one <a href="https://developer.android.com/reference/android/os/Looper.html" title="class or interface in android.os" class="externalLink" target="_top"><code>Looper</code></a> message queue iteration are
 reported together and only after all individual callbacks were triggered.

 <p>Listeners should prefer this method over individual callbacks in the following cases:

 <ul>
   <li>They intend to trigger the same logic for multiple events (e.g. when updating a UI for
       both <a href="AnalyticsListener.html#onPlaybackStateChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int)"><code>AnalyticsListener.onPlaybackStateChanged(EventTime, int)</code></a> and <a href="AnalyticsListener.html#onPlayWhenReadyChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,boolean,int)"><code>AnalyticsListener.onPlayWhenReadyChanged(EventTime, boolean, int)</code></a>).
   <li>They need access to the <a href="../Player.html" title="interface in com.google.android.exoplayer2"><code>Player</code></a> object to trigger further events (e.g. to call
       <a href="../Player.html#seekTo(long)"><code>Player.seekTo(long)</code></a> after a <a href="AnalyticsListener.html#onMediaItemTransition(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.MediaItem,int)"><code>AnalyticsListener.onMediaItemTransition(EventTime, MediaItem, int)</code></a>).
   <li>They intend to use multiple state values together or in combination with <a href="../Player.html" title="interface in com.google.android.exoplayer2"><code>Player</code></a>
       getter methods. For example using <a href="../Player.html#getCurrentWindowIndex()"><code>Player.getCurrentWindowIndex()</code></a> with the <code>
       timeline</code> provided in <a href="AnalyticsListener.html#onTimelineChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int)"><code>AnalyticsListener.onTimelineChanged(EventTime, int)</code></a> is only safe from within
       this method.
   <li>They are interested in events that logically happened together (e.g <a href="AnalyticsListener.html#onPlaybackStateChanged(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,int)"><code>AnalyticsListener.onPlaybackStateChanged(EventTime, int)</code></a> to <a href="../Player.html#STATE_BUFFERING"><code>Player.STATE_BUFFERING</code></a> because of
       <a href="AnalyticsListener.html#onMediaItemTransition(com.google.android.exoplayer2.analytics.AnalyticsListener.EventTime,com.google.android.exoplayer2.MediaItem,int)"><code>AnalyticsListener.onMediaItemTransition(EventTime, MediaItem, int)</code></a>).
 </ul></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="AnalyticsListener.html#onEvents(com.google.android.exoplayer2.Player,com.google.android.exoplayer2.analytics.AnalyticsListener.Events)">onEvents</a></code>&nbsp;in interface&nbsp;<code><a href="AnalyticsListener.html" title="interface in com.google.android.exoplayer2.analytics">AnalyticsListener</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>player</code> - The <a href="../Player.html" title="interface in com.google.android.exoplayer2"><code>Player</code></a>.</dd>
<dd><code>events</code> - The <a href="AnalyticsListener.Events.html" title="class in com.google.android.exoplayer2.analytics"><code>AnalyticsListener.Events</code></a> that occurred in this iteration.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
